<div class="layui-layout layui-layout-content">
	<div class="layui-side layui-bg-black">
		<div class="layui-side-scroll">
		<#include "/apps/setting/include/left.html"/></div>
	</div>
	<div class="layui-body">
		<div class="layui-side-scroll">
			<form method="post" key="set-mine" enctype="multipart/form-data" action="/setting/monitor/save.html" class="layui-form">
				<#if sessionConfig??><input type="hidden" name="id" value="${sessionConfig.id!''}"></#if>
				<div class="row">
					<div class="col-lg-12">
						<div class="ukefu-customer-div setting-wrapper">
							<div class="box default-box">
								<div class="box-header">
									<h3 class="box-title">智能监控配置</h3>
								</div>
								<div class="box-body ukefu-im-theme">
									<div class="row">
										<div class="col-lg-8">
											<div class="ukefu-webim-prop">
												<div class="ukefu-webim-tl" style="clear:both;">1、响应超时</div>
												<div class="box-item">
													<div class="row">
														<div class="col-lg-8">
															<p>监控会话响应超时时长</p>
															<p style="color:#888888;font-size:13px;margin-top:10px;">开启后，监控用户在指定时间内没有响应的会话</p>
														</div>
														<div class="col-lg-4" style="text-align:right;">
															<input type="checkbox" title="启用" name="responsetimeout" id="responsetimeout" lay-filter="responsetimeout" <#if sessionConfig?? && sessionConfig.responsetimeout == true>checked="checked"</#if>>
														</div>
													</div>
												</div>
												<div class="box-item" id="responsetimeout_tip" style="<#if sessionConfig?? && sessionConfig.responsetimeout == false>display:none;</#if>">	
													<div class="row">
														<div class="col-lg-8">
															<p>超时时长（秒）</p>
														</div>
														<div class="col-lg-4" style="text-align:right;">
															<input type="text" name="responsetimeouts" id="responsetimeouts" lay-verify="number" value="<#if sessionConfig?? && sessionConfig.responsetimeouts gt 0>${sessionConfig.responsetimeouts}<#else>120</#if>" autocomplete="off" class="layui-input" style="width:80px;display:inline;">
														</div>
													</div>
												</div>
											</div>
											<div class="ukefu-webim-prop">
												<div class="ukefu-webim-tl" style="clear:both;">2、会话超时</div>
												<div class="box-item">
													<div class="row">
														<div class="col-lg-8">
															<p>监控对话超时时长</p>
															<p style="color:#888888;font-size:13px;margin-top:10px;">开启后，监控超时的会话</p>
														</div>
														<div class="col-lg-4" style="text-align:right;">
															<input type="checkbox" title="启用" name="sestimeout" id="sestimeout" lay-filter="sestimeout" <#if sessionConfig?? && sessionConfig.sestimeout == true>checked="checked"</#if>>
														</div>
													</div>
												</div>
												<div class="box-item" id="sestimeout_tip" style="<#if sessionConfig?? && sessionConfig.sestimeout == false>display:none;</#if>">	
													<div class="row">
														<div class="col-lg-8">
															<p>超时时长（秒）</p>
														</div>
														<div class="col-lg-4" style="text-align:right;">
															<input type="text" name="sestimeouts" id="sestimeouts" lay-verify="number" value="<#if sessionConfig?? && sessionConfig.sestimeouts gt 0>${sessionConfig.sestimeouts}<#else>120</#if>" autocomplete="off" class="layui-input" style="width:80px;display:inline;">
														</div>
													</div>
												</div>
											</div>
											<div class="ukefu-webim-prop">
												<div class="ukefu-webim-tl" style="clear:both;">3、排队超时</div>
												<div class="box-item">
													<div class="row">
														<div class="col-lg-8">
															<p>监控排队超时时长</p>
															<p style="color:#888888;font-size:13px;margin-top:10px;">开启后，监控用户排队超时的会话</p>
														</div>
														<div class="col-lg-4" style="text-align:right;">
															<input type="checkbox" title="启用" name="inquenetimeout" id="inquenetimeout" lay-filter="inquenetimeout" <#if sessionConfig?? && sessionConfig.inquenetimeout == true>checked="checked"</#if>>
														</div>
													</div>
												</div>
												<div class="box-item" id="inquenetimeout_tip" style="<#if sessionConfig?? && sessionConfig.inquenetimeout == false>display:none;</#if>">	
													<div class="row">
														<div class="col-lg-8">
															<p>超时时长（秒）</p>
														</div>
														<div class="col-lg-4" style="text-align:right;">
															<input type="text" name="inquenetimeouts" id="inquenetimeouts" lay-verify="number" value="<#if sessionConfig?? && sessionConfig.inquenetimeouts gt 0>${sessionConfig.inquenetimeouts}<#else>120</#if>" autocomplete="off" class="layui-input" style="width:80px;display:inline;">
														</div>
													</div>
												</div>
											</div>
											<div class="ukefu-webim-prop">
												<div class="ukefu-webim-tl" style="clear:both;">4、会话无效</div>
												<div class="box-item">
													<div class="row">
														<div class="col-lg-8">
															<p>监控无效的会话</p>
															<p style="color:#888888;font-size:13px;margin-top:10px;">开启后，监控无效的会话</p>
														</div>
														<div class="col-lg-4" style="text-align:right;">
															<input type="checkbox" title="启用" name="agentinvalid" id="agentinvalid" lay-filter="agentinvalid" <#if sessionConfig?? && sessionConfig.agentinvalid == true>checked="checked"</#if>>
														</div>
													</div>
												</div>
											</div>
											<div class="ukefu-webim-prop">
												<div class="ukefu-webim-tl" style="clear:both;">5、满意度</div>
												<div class="box-item">
													<div class="row">
														<div class="col-lg-8">
															<p>监控会话满意度</p>
															<p style="color:#888888;font-size:13px;margin-top:10px;">开启后，监控满意度为配置级别的会话</p>
														</div>
														<div class="col-lg-4" style="text-align:right;">
															<input type="checkbox" title="启用" name="satisfactions" id="satisfactions" lay-filter="satisfactions" <#if sessionConfig?? && sessionConfig.satisfactions == true>checked="checked"</#if>>
														</div>
													</div>
												</div>
												<div class="box-item" id="satisfactions_tip" style="<#if sessionConfig?? && sessionConfig.satisfactions == false>display:none;</#if>">	
													<div class="row">
														<div class="col-lg-4">
															<p>满意度级别</p>
														</div>
														<div class="col-lg-8" style="text-align:right;">
															<#list uKeFuDic['com.dic.webim.comment'] as comment>
																<input type="checkbox" name="satislevels" title="${comment.name!''}" value="${comment.code!''}" lay-skin="primary" <#if sessionConfig.satislevels?? && sessionConfig.satislevels?split(",")?seq_contains(comment.code)>checked</#if>>
															</#list>
														</div>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
							
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-lg-3"></div>
					<div class="col-lg-9">
						<div class="layui-form-item">
						  <div class="layui-input-block">
							<button class="layui-btn" lay-submit="" lay-filter="formDemo">保存</button>
							<button type="reset" class="layui-btn layui-btn-primary">重置</button>
						  </div>
						</div>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>

<script language="javascript"> 		
	layui.use('form', function(){
		var form = layui.form;
		form.render('select'); //刷新select选择框渲染
		form.on("checkbox(responsetimeout)" , function(data){
			if(data.elem.checked == true){
				$('#responsetimeout_tip').show();		
			}else{
				$('#responsetimeout_tip').hide();
			}
		});
		form.on("checkbox(sestimeout)" , function(data){
			if(data.elem.checked == true){
				$('#sestimeout_tip').show();		
			}else{
				$('#sestimeout_tip').hide();
			}
		});
		form.on("checkbox(inquenetimeout)" , function(data){
			if(data.elem.checked == true){
				$('#inquenetimeout_tip').show();		
			}else{
				$('#inquenetimeout_tip').hide();
			}
		});
		form.on("checkbox(satisfactions)" , function(data){
			if(data.elem.checked == true){
				$('#satisfactions_tip').show();		
			}else{
				$('#satisfactions_tip').hide();
			}
		});
		
	});
</script>